class Node:
    def __init__(self, data):
        self.data = data
        self.next = None

class CustomLinkedListIterator:
    def __init__(self, linked_list):
        self.current = linked_list.head

    def __iter__(self):
        return self

    def __next__(self):
        if not self.current:
            raise StopIteration
        data = self.current.data
        self.current = self.current.next
        return data

class LinkedList:
    def __init__(self):
        self.head = None

    def append(self, data):
        new_node = Node(data)
        if not self.head:
            self.head = new_node
        else:
            current = self.head
            while current.next:
                current = current.next
            current.next = new_node

    def __iter__(self):
        return CustomLinkedListIterator(self)

my_list = LinkedList()
my_list.append(1)
my_list.append(2)
my_list.append(3)

for item in my_list:
    print(item)